package com.cch.android.activity.vf;


import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.cch.android.activity.ImageMainActivity;
import com.cch.android.activity.KusoImageActivity;
import com.cch.android.activity.ModelLandscapActivity;
import com.cch.android.activity.R;
import com.cch.android.activity.PuzzleImageActivity;
import com.cch.android.util.MyLog;

public class ModelView extends AbstractView implements OnClickListener{
	private Button function_button_1;
	private Button function_button_2;
	private Button function_button_3;
	public ModelView(ImageMainActivity va) {
		super(va);
	}

	public View makeNewView() {
		View view = View.inflate(context, R.layout.local_model, null);
		function_button_1 = (Button) view.findViewById(R.id.local_function_button_1);
		function_button_2 = (Button) view.findViewById(R.id.local_function_button_2);
		function_button_3 = (Button) view.findViewById(R.id.local_function_button_3);
		function_button_1.setOnClickListener(this);
		function_button_2.setOnClickListener(this);
		function_button_3.setOnClickListener(this);
		return view;
	}

	@Override
	public void onClick(View v) {
		Intent it = new Intent();
		switch (v.getId()) {
		case R.id.local_function_button_1:
			MyLog.log("美化图片");
			it.setClass(context, ModelLandscapActivity.class);
			context.startActivity(it);
			break;
		case R.id.local_function_button_2:
			MyLog.log("拼图");
			it.setClass(context, PuzzleImageActivity.class);
			context.startActivity(it);
			break;
		case R.id.local_function_button_3:
			MyLog.log("恶搞图片");
			it.setClass(context, KusoImageActivity.class);
			context.startActivity(it);
			break;
		}
	}
}